<?php
/*
Template Name: Brand Landing Page
*/
?>

<?php
/**
 * The template for displaying all pages.
 *
 * This is the template that displays all pages by default.
 * Please note that this is the WordPress construct of pages
 * and that other 'pages' on your WordPress site will use a
 * different template.
 *
 * @package WordPress
 * @subpackage Twenty_Twelve
 * @since Twenty Twelve 1.0
 */
 
global $productbrand, $productbrandimage, $productbrandblurb;
$productbrand = get_post_meta($post->ID, 'productbrand', true);
$productbrandimage = get_post_meta($post->ID, 'productbrandimage', true);
$productbrandblurb = get_post_meta($post->ID, 'productbrandblurb', true);

get_header(); ?>

	<style>
		.yarpp-related { display:none; }
	</style>

	<?php if($is_iphone) { ?>
    		<style>
				#main { width:1040px;float:left;margin:0px; }
			</style>
	<?php } ?>
	
	<?php get_sidebar(); ?>

	<div id="primary" class="site-content">
		<div id="content" role="main">
        
        	<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
				<header class="entry-header">
					<h1 class="entry-title"><?php the_title(); ?></h1>
                    <?php include 'social-block.php'; ?>
				</header>

				<?php the_content(); ?>
                
                <div style="float:right;margin:0px;margin-left:20px;margin-bottom:10px;border:#cccccc 1px solid;">
                        <?php if($productbrandimage != none) { ?>
                            <img src="/../<?php echo $productbrandimage ; ?>" alt="<?php echo $productbrand ; ?> Products" width="250" />
                        <?php } else { ?>
                            <img src="/../wp-content/themes/siliconsolar/images/siliconsolar-logo300.jpg" alt="<?php echo $productbrand ; ?> Products" width="250" />
                        <?php } ?>
                </div>
                
                <p style="line-height:16px;">
                	<?php echo $productbrandblurb ; ?>
                </p>
                
                <div style="width:100%;height:1px;background:#cccccc;margin-top:10px;margin-bottom:20px;clear:both;"></div>
                
                <?php include 'page-include-brandpageproductcode.php' ; ?>
                
                <?php include 'custom-function-documents-by-brand.php' ; ?>
                
			</article>

		</div><!-- #content -->
        
	</div><!-- #primary -->

<?php get_footer(); ?>